/**
 * @author klv
 */
var QS_screenerConfig={
    fixedCriteria:['OS01W'],//'keyword and symbol',
    universeCategory:[
        {
            txt: 'Stock',
            val: 'ST',
            closable: false
        },{
            txt: 'Exchange Traded Fund',
            val: 'FE',
            closable: false
        }
//      ,{
//          txt: 'Open End Fund',
//          val: 'FO',
//          closable: false
//      },{
//          txt: 'Closed End Fund',
//          val: 'FC',
//          closable: false
//      }
    ],
    groupBoxCategory:{
        'ST': [{
            name: 'Snapshot',
            id: 'sna',
            closable: false
        }, {
            name: 'Growth',
            id: 'gro',
            closable: false
        }, {
            name: 'Market',
            id: 'mar',
            closable: false
        },{
            name: 'Valuation',
            id: 'val',
            closable: false
        }],
        'FE': [{
            name: 'Snapshot',
            id: 'sna',
            closable: false
        }, {
            name: 'Performance',
            id: 'per',
            closable: false
        }, {
            name: 'Portfolio',
            id: 'por',
            closable: false
        }],
        'FO': [{
            name: 'Snapshot',
            id: 'sna',
            closable: false
        }, {
            name: 'Performance and Risk',
            id: 'per',
            closable: false
        }, {
            name: 'Portfolio',
            id: 'por',
            closable: false
        }]
    },
    getGroupBoxDetail:function(cate,groupid){
		var groupboxDetail = {
			'ST': {
				'sna': ['HS05A', 'RR01Y', 'ST167', 'OS01V', 'LS01Z', 'AA0F9'],
				'gro': ['ST755', 'STA99', 'ST263', 'PD003', 'AA0FP'],
				'mar': ['ST159', 'ST168', 'ST169'],
				'val': ['HS05X', 'ST198', 'ST299', 'HS736', 'HS737']
			},
			'FE': {
				'sna': ['LF002', 'RR01Y', 'OS05P', 'OS02W', 'OF009', 'OS01V', 'LS01Z', 'AA0F9', 'OF003', 'OF00L'],
				'per': ['PM006', 'PM00A', 'PM00C', 'PM00E', 'PM032', 'PD003', 'AA0FP'],
				'por': ['HS008', 'HS07J', 'RR01Y', 'HS00L', 'OS640']
			},
			'FO': {
				'sna': ['RR01Y', 'OF028', 'OS05P', 'HS0DQ', 'OS01V', 'LS01Z'],
				'per': ['PM00E', 'PM00G', 'PM00I'],
				'por': ['HS05A', 'HS00L']
			},
			'FC': {
				'sna': ['OF006', 'LF002', 'OF028', 'RR01Y', 'OS00M', 'HS0DQ', 'OS01V', 'LS01Z'],
				'per': ['LA03Z', 'ST816', 'OS010'],
				'por': ['HS05A', 'HS05A', 'HS00L']
			}
		}
		$.extend(true,groupboxDetail,this.subGroupBoxDetail||{});
		return groupboxDetail[cate][groupid];
    },
    viewTabData:{
        'ST': [{
            txt: 'Snapshot',
            id: 'sna',
            closable: false
        }, {
            txt: 'Growth',
            id: 'gro',
            closable: false
        }, {
            txt: 'Market',
            id: 'mar',
            closable: false
        },{
            txt: 'Profitability',
            id: 'pro',
            closable: false
        },{
            txt: 'Valuation',
            id: 'val',
            closable: false
        }],
        'FE':[{
            txt: 'Snapshot',
            id: 'sna',
            closable: false
        }, {
            txt: 'Performance',
            id: 'per',
            closable: false
        }, {
            txt: 'Portfolio',
            id: 'por',
            closable: false
        },{
            txt: 'Fundamentals',
            id: 'fun',
            closable: false
        },{
            txt: 'Risk',
            id: 'ris',
            closable: false
        }],
        'FO':[{
            txt: 'Performance',
            id: 'per',
            closable: false
        }, {
            txt: 'Portfolio',
            id: 'por',
            closable: false
        }, {
            txt: 'Morningstar Ratings',
            id: 'mor',
            closable: false
        }],
        'FC':[{
            txt: 'Snapshot',
            id: 'sna',
            closable: false
        }, {
            txt: 'Performance-NAV Return',
            id: 'per',
            closable: false
        }, {
            txt: 'Performance-Mkt Return',
            id: 'per',
            closable: false
        },{
            txt: 'Portfolio',
            id: 'por',
            closable: false
        },{
            txt: 'Operation',
            id: 'ope',
            closable: false
        }]
    },
    getViewColumnData: function(cate, tabid){
		var viewColumnData = {
			'ST': {
				'sna': ['OS01W', this.getCode('OS001'), 'HS05A', 'RR01Y', 'OS01V', 'LS01Z', 'AA0F9', 'ST167'],
				'gro': ['OS01W', this.getCode('OS001'), 'ST755', 'STA99', 'ST263', 'PD003', 'AA0FP'],
				'mar': ['OS01W', this.getCode('OS001'), 'ST159', 'ST168', 'ST169', 'STA0K', 'PD00B', 'PD007', 'PD009'],
				'pro': ['OS01W', this.getCode('OS001'), 'STA6H', 'ST398'],
				'val': ['OS01W', this.getCode('OS001'), 'HS05X', 'ST198', 'HS736', 'HS737', 'ST299', 'STA65']
			},
			'FE': {
				'sna': ['OS01W', this.getCode('OS001'), 'OS05P', 'OF009', 'RR01Y', 'OS01V', 'LS01Z', 'AA0F9', 'OS02W', 'OF003', 'OF00L'],
				'per': ['OS01W', this.getCode('OS001'), 'PM006', 'PM00A', 'PM00C', 'PM00E', 'PM00G', 'PM00M', 'PD003', 'AA0FP'],
				'por': ['OS01W', this.getCode('OS001'), 'HS00L', 'OS640', 'HS008', 'HS07J'],
				'fun': ['OS01W', this.getCode('OS001'), 'PM032', 'PM038', 'HS05X', 'OS02W'],
				'ris': ['OS01W', this.getCode('OS001'), 'RR177']
			},
			'FO': {
				'per': ['OS01W', 'PM00E', 'PM00G', 'PM00I', 'PM525', 'PM526', 'PM527', 'PM528', 'OS05P', 'OS05O'],
				'por': ['HS05A', 'HS00L', 'HS11B', 'HS11D', 'HS11E', 'HS11F'],
				'mor': ['OF028', 'RR01Y', 'HS0DQ']
			},
			'FC': {
				'sna': ['OS01W', this.getCode('OS001'), 'LS01Z', 'OS01V', 'OS010', 'OS05J', 'OS05K', 'OS01V', 'LS01Z'],
				'per': ['OF006', this.getCode('OS001'), 'OF028', 'HS0DQ', 'RR01Y'],
				'mor': ['PM004', 'PM00A', 'PM00C', 'PM00E', 'PM00G', 'PM00M'],
				'por': ['HS05A', 'HS00L', 'HS11B', 'HS11D', 'HS11E', 'HS11F'],
				'ope': ['OF006', 'OS00M']
			}
		};
		$.extend(true,viewColumnData,this.subViewColumnData||{});
		if (typeof tabid == 'undefined') {
			return viewColumnData[cate]
		}else {
            return viewColumnData[cate][tabid];
		}
		
    }  
};
